<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="https://cdn.bootcss.com/vue/2.6.10/vue.js"></script>
</head>
<body>
    <!-- vue可以在html中使用if -->
    <div id="app">
        <h2 @click="handleClick">{{msg}}</h2>
      </div>
      <script>
          new Vue({
              el:"#app",
              data:{
                  msg:"hello world"
              },
              methods:{
                  handleClick(){
                      this.msg = "change";
                  }
              }


          })
      </script>
    
</body>
</html>